<script src="../media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="../media/system/js/core.js" type="text/javascript"></script>
<script type="text/javascript" src="../media/system/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../media/system/js/jQuery.vietvang.validate.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$('#adminForm').validate({
			});
		});
</script>
<form action="index.php?top=page&option=com_fractivitive" method="post" name="adminForm" id="adminForm" class="adminform">
<!-- LEFT -->
 <?php echo $this->loadTemplate('search','default') ?>
 <!-- END LEFT -->
 
 <!-- CONTENT -->
 
 <div id="jm-content">
    <h3 class="jm-title">
         <?php
            if($this->sr=='1')
            {
                echo '検索結果';
            }
            else echo '新着情報';
            ?>
    </h3>
        <div class="">
            
                <?php
                    $rows=$this->rows;
                    if ($rows !=null)
                    {
                        foreach($rows as $row)
                    {
                ?>
                        <div class="cc">
                        <h2 style="position: relative;">
                        <span class="id-cc"><?php echo $row->ACTT_NAME; ?></span>
                        <span style="float: right;position:absolute;right:5px;top:1px;">
                            <!--<button style="margin-top: 2px;" href="index.php?top=page&option=com_fractivitive&task=detail&cid[0]=<?php echo $row->ACTT_CODE; ?>">詳細</button> -->
                            
                            <input style="display:none" type="checkbox" id="cb<?php echo $row->ACTT_CODE ?>" name="cid" value="<?php echo $row->ACTT_CODE ?>" onclick="Joomla.isChecked(this.checked);" />
                            <button style="margin-top: 2px;" onclick="document.id('cb<?php echo $row->ACTT_CODE; ?>').checked=true;Joomla.submitbutton('detail');">詳細</button>
                            

                        </span>
                        <span style="float: right;position:absolute;right:60px;top:3px;">
                                    <?php $a= $row->ACTT_RECOMMENDED_DEGREE;
                                        
                                        for($i=1;$i<=$a;$i++)
                                        {
                                            echo '<img height="14" src="components/com_fractivitive/public/images/hoshi.gif" width="14" />';
                                            //echo $i;
                                        } 
                                    ?>
                                    
                                   
                        </span>
                        </h2>
                    
                        <table style="width: 100%;" border=0>
                            <tbody>
                                <tr>
                                    <td class="td_large" colspan="3"><?php echo $row->ACTT_REMARKS; ?></td>                                      
                                </tr>
                                <tr>
                                    <td colspan="4"><hr /></td>
                                </tr>
                                <tr>
                                    <td style="width: 25%;">【センター・クラブ名】</td>
                                    <td style="width: 40%;"><?php echo $row->OCBA_NAME; ?></td>
                                    <td style="width: 35%;">
                                        <?php
                                            $reg=$row->ACTT_RECR;
                                            if ($reg==1)
                                                echo '募集開始前';
                                            else if ($reg==2)
                                                echo ' 募集中';
                                            else if ($reg==3)
                                                echo '募集終了';
                                        ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%;">【期間】</td>
                                    <td style="width: 30%;">
                                        <?php if($row->ACTT_PERIOD_START!='0000-00-00') { echo HelperBG::F_GetDate_JP($row->ACTT_PERIOD_START);echo ' ～ ';} ?><?php if($row->ACTT_PERIOD_FINISH!='0000-00-00') echo HelperBG::F_GetDate_JP($row->ACTT_PERIOD_FINISH); ?></td>                                        
                                    </td>
                                    <td style="width: 30%;">【人数】:<?php if($row->ACTT_NUMBER_OF_PARTICIPANTS == '' || $row->ACTT_NUMBER_OF_PARTICIPANTS == 'null') {echo '';} else{ echo $row->ACTT_NUMBER_OF_PARTICIPANTS.'人';} ?></td>
                                </tr>
                                <tr>
                                    <td style="width: 15%;vertical-align: top;">【ジャンル】</td>
                                    <td style="width: 30%;" colspan="2">
                                        <!-- GET MCON,MFAC,MOBJ -->
                                            <?php
                                               $str='';
                                                $af=explode(",",$row->ACTT_MFAC_CODE_LIST);
                                                    foreach ($af as $k=>$vl)
                                                    {
                                                        foreach($this->mfac as $key=>$value)
                                                        {
                                                            if($value->MFAC_CODE==$vl)
                                                            {
                                                                $str=$str.$value->MFAC_NAME.',';
                                                            }
                                                        }
                                                    }
                                                    
                                                $ao=explode(",",$row->ACTT_MOBJ_CODE_LIST);
                                                    foreach ($ao as $k=>$vl)
                                                    {
                                                        foreach($this->mobj as $key=>$value)
                                                        {
                                                            if($value->MOBJ_CODE==$vl)
                                                            {
                                                                 $str=$str.$value->MOBJ_NAME.',';
                                                            }
                                                        }
                                                    }
                                                $ac=explode(",",$row->ACTT_MCON_CODE_LIST);
                                                    foreach ($ac as $k=>$vl)
                                                    {
                                                        foreach($this->mcon as $key=>$value)
                                                        {
                                                            if($value->MCON_CODE==$vl)
                                                            {
                                                                 $str=$str.$value->MCON_NAME.',';
                                                            }
                                                        }
                                                    }
                                                    $str = substr($str,0,-1);      
                                                    echo $str;
                                            
                                            ?>                                
                                    </td>
                                    
                                </tr>
                                </tbody>
                        </table>
                           
                        </div>  
                        <?php
                        }
                        }
                        else
                            {
                            
                             echo "<center>データは見つかりませんでした</center>";
           
                             }
                        ?>               
            <table style="margin: auto;">
                <tfoot>
        			<tr>
        				<td style="text-align: center;">
        				    <?php echo $this->pagination->getListFooter(); ?>	
                        </td>
        			</tr>
        		</tfoot>
            </table>
            </div>
      </div>
    <!-- <input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" /> -->
    <input type="hidden" name="task" id="task" value="" /> 
      
</form>

<!--

 <!-- END RIGHT -->
